package com.lxq.live.controller;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.function.*;

@Component
public class WebFluxController {

    @Bean
    public RouterFunction routeController(){
        return RouterFunctions.route()
                .GET("/flux/get1", request -> ServerResponse.ok().body("我爱你"))
                .GET("/flux/get2",request -> ServerResponse.ok().body("<h1>操你妈</h1>")).build();
    }
}
